﻿namespace PageAdmin.Utils
{

    /// <summary>
    /// 缩列图配置类
    /// </summary>
    public class ThumbnailSetting
    {
        private int _Quality=8;

        /// <summary>
        /// 图片路径
        /// </summary>
       public  string ImagePath { get; set; }

        /// <summary>
        /// 图片质量，1-10之间整数，默认8
        /// </summary>
        public int Quality
        {
            get
            {
                return _Quality;
            }
            set
            {
                _Quality = value;
                if (_Quality > 10 && _Quality <= 0)
                {
                    _Quality = 10;
                }
            }
        }


        /// <summary>
        /// 生成的缩列图的宽度px，默认100
        /// </summary>
        public int Width { get; set; } = 100;


        /// <summary>
        /// 生成的缩列图的高度px，默认100
        /// </summary>
        public int Height { get; set; } = 100;

        /// <summary>
        /// 生成后的水印图片的前缀，在原图片名称上的前缀，默认为tb
        /// </summary>
        public string ImagePrefix { get; set; } ="tb";

        /// <summary>
        /// 生成后是否删除原图片，默认为true。
        /// </summary>
        public bool DelSourceImage {get; set; }=true;


    }
}